Carbon


SetWindowProxyAlias

Header: MacWindows.h Carbon status: Supported

Associates a file with a window.

OSStatus SetWindowProxyAlias (
    WindowRef window, 
    AliasHandle alias
);
window

A pointer to the window with which the specified file is to be associated.

alias

A handle to a structure of type AliasRecord for the file to associate with the specified window. You can obtain an alias handle by calling the function GetWindowProxyAlias.

function result

A result code.

DISCUSSION

Your application should call the SetWindowProxyAlias function to establish a proxy icon for a given window. The creator code and file type of the file associated with a window determine the proxy icon that is displayed for the window.

Because the SetWindowProxyAlias function won’t work without a saved file, you must establish the initial proxy icon for a new, untitled window with the function SetWindowProxyCreatorAndType, which requires that you know the file type and creator code for the file, but does not require that the file have been saved.

See also the function SetWindowProxyFSSpec.

SPECIAL CONSIDERATIONS

With Mac OS 8.5, you must save and restore the current graphics port—by calling the QuickDraw functions GetPort and SetPort—around each call to the SetWindowProxyAlias function.

VERSION NOTES

This function is available with Mac OS 8.5 and later.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when WindowsLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by WindowsLib 8.5 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)